package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.entity.Permission;
import com.qf.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @propram: IntelliJ IDEA
 * @description:
 * @author: 秦先发
 * @create: 2021-09-27 19:17
 **/
public interface AutoMapper {

    List<Permission> selectAllJson();

    Permission getById(Integer id);

    List<User> selectRoleUser(Integer rid);

    int deleteUsers(@Param("rid") Integer rid, @Param("users") List<User> users);

    int addRoleByUser(@Param("rid") Integer rid, @Param("users") List<User> users);

    List<Integer> selectPermissionByRid(Integer rid);

    int addRoleByPermission(Integer rid, List<Integer> pids);

    int deleteRoleByPermission(Integer rid);
}
